﻿using System;


namespace TopBuilds.Restaurant.Data
{
    public class ProductCategory
    {
        #region 属性
        private int _id;
        private int _productCategoryId;
        private int _factoryId;
        private string  _userDefinedId;
        private string _name;
        private int _discount;
        #endregion 

        #region 构造
        public ProductCategory()
        {
            //_id                       = 0;
            _productCategoryId        = 0;
            _factoryId                = 0;
            _userDefinedId            = null;
            _name                     = null;
            _discount                 = 0;
        }

        public ProductCategory(int productCategoryId)
        {
            _productCategoryId        = productCategoryId;
            _factoryId                = 0;
            _userDefinedId            = null;
            _name                     = null;
            _discount                 = 0;
        }

        public ProductCategory(int productCategoryId, int factoryId)
        {
            _productCategoryId        = productCategoryId;
            _factoryId                = factoryId;
            _userDefinedId            = null;
            _name                     = null;
            _discount                 = 0;
        }

        public ProductCategory(int productCategoryId, int factoryId, string userDefinedId)
        {
            _productCategoryId        = productCategoryId;
            _factoryId                = factoryId;
            _userDefinedId            = userDefinedId;
            _name                     = null;
            _discount                 = 0;
        }

        public ProductCategory(int productCategoryId, int factoryId, string userDefinedId, string  name)
        {
            _productCategoryId        = productCategoryId;
            _factoryId                = factoryId;
            _userDefinedId            = userDefinedId;
            _name                     = name;
            _discount                 = 0;
        }

        public ProductCategory(int productCategoryId, int factoryId, string userDefinedId, string name, int discount)
        {
            _productCategoryId        = productCategoryId;
            _factoryId                = factoryId;
            _userDefinedId            = userDefinedId;
            _name                     = name;
            _discount                 = discount;
        }
        #endregion

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public int ProductCategoryId
        {
            get { return _productCategoryId; }
            set{_productCategoryId = value;}
        }

        public int FactoryId
        {
            get { return _factoryId; }
            set { _factoryId = value; }
        }

        public string UserDefinedId
        {
            get { return _userDefinedId; }
            set { _userDefinedId = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public int Discount
        {
            get { return _discount; }
            set { _discount = value; }
        }
        public override string ToString()
        {
            return Name;
        }

    }
}
